package com.partner.service.order;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.partner.bean.order.Order;
import com.partner.bean.order.Ordermi;
import com.partner.mapper.order.OrdermiMapper;


@Service("ordermi")
public class OrdermiService {

	@Autowired
	private OrdermiMapper ordermiMapper;
	
	public OrdermiMapper getServiceMapper(){
		return ordermiMapper;
	}
	
	public int insert(Ordermi s) {
		int id =0 ;	
		try {
		   id =	ordermiMapper.insert(s);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return id ;
	}
	
	public List<Ordermi> selectAll(Ordermi ordermi) {
		return ordermiMapper.selectAll(ordermi);
	}
	
	public Ordermi selectByPrimaryId(Integer id){
		return ordermiMapper.selectByPrimaryId(id);
	}
	
	public int removeByPrimaryKey(Integer id){
		return ordermiMapper.deleteByPrimaryKey(id);
	}
	
	public int deleteByids(String[] ids){
		return ordermiMapper.deleteByids(ids);
	}
	
	public int updateByPrimaryKey(Ordermi ordermi){
		return ordermiMapper.updateByPrimaryKey(ordermi);
	}

	public List<Ordermi> report4(Ordermi ordermi) {
		return ordermiMapper.report4(ordermi);
	}

	public Integer getTotalAmountByUserId(Integer sysuserid) {
		return ordermiMapper.getTotalAmountByUserId(sysuserid);
	}

	public List<Ordermi> report2(Ordermi ordermi) {
		return ordermiMapper.report2(ordermi);
	}
}
